﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="productdetails.aspx.cs" Inherits="NSX07.productdetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="center_title_bar">Product details</div>
    <div class="centerlogin">
        <div class="centerlogin">
        <asp:DataList ID="DataList2" runat="server" DataKeyField="id" 
            DataSourceID="ProductDetailsDataSource">
            <ItemTemplate>
            <div class="oferta_detail">
                <asp:Image ID="Image1" CssClass="oferta_img" runat="server" Height="260px" Width="200px" ImageUrl='<%# Eval("imageUrl") %>' />
               
                    <div class="oferta_title"><asp:Label ID="Label1" runat="server" Text='<%# Eval("name") %>' ForeColor="#000066" /></div>
                    <div class="oferta_author">
                        Author: <asp:Label ID="Label3" runat="server" Text='<%# Eval("Author") %>' ForeColor="Maroon" /> <br />
                        Publish Date:  <asp:Label ID="Label4" runat="server" Text='<%# Eval("publishDate") %>' ForeColor="#660066" />
                    </div>
                    <div class="oferta_text">
                         <asp:Label ID="Label2" runat="server"  Text='<%# Eval("description") %>' />
                    </div>
                        <div class="prod_price">
                            Stock: <asp:Label ID="stockLabel" runat="server" Text='<%# Eval("stock") %>' ForeColor="Red" />
                        </div>
                        <div class="prod_price">
                            Price: $<span class="price"><%# Eval("price") %></span>
                        </div>
                    </div>    
                     <div class="prod_details_tab">
                        &nbsp;<asp:Button ID="addToCartPDPage" runat="server" CssClass="prod_buy" 
                             onclick="addToCartPDPage_Click" Text="Add To Cart" />
                    </div>
            </div>
            </ItemTemplate>
        </asp:DataList>
    
    <asp:ObjectDataSource ID="ProductDetailsDataSource" runat="server" 
        DeleteMethod="Delete" 
        OldValuesParameterFormatString="original_{0}" 
        SelectMethod="GetProductDetailsById" 
        TypeName="NSX07.App_Code.MyDalLayerTableAdapters.ProductTableAdapter">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="idProduct" 
                QueryStringField="id" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </div>
    </div>
</asp:Content>
